package com.alks.function.controller.stockdept.pcfactorywork;

import com.alks.common.aop.ApiRestController;
import com.alks.common.aop.WebLogger;
import com.alks.entity.data.response.ResponseInfo;
import com.alks.function.data.request.stockdept.pcfactoryquery.SurplusIoRequest;
import com.alks.function.service.stockdept.pcfactoryquery.ISurplusService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author MS
 * @since 2024/8/12下午3:02
 */
@RestController
@ApiRestController("/stkQuery/surplus/out")
@Api(value = "仓储部", tags = "仓储部-仓储工厂查询-剩料出库查询")
@Slf4j
public class SurplusOutController {
    @Autowired
    private ISurplusService service;

    private final String slipType = "O";

    @WebLogger
    @PostMapping("/temp")
    @ApiOperation(value = "剩料入库查询-分页可条件查询", tags = "仓储部-仓储工厂查询-剩料出库查询")
    public ResponseInfo temp(@RequestBody SurplusIoRequest request) {
        return service.temp(request,slipType);
    }

    @WebLogger
    @PostMapping("/back")
    @ApiOperation(value = "回显-查询", tags = "仓储部-仓储工厂查询-剩料出库查询")
    public ResponseInfo back() {
        return service.back(slipType);
    }


}